load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "engineccl",
    srcs = [
        "ctr_stream.go",
        "encrypted_fs.go",
        "pebble_key_manager.go",
        "shared_storage.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/ccl/storageccl/engineccl",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/ccl/baseccl",
        "//pkg/ccl/storageccl/engineccl/enginepbccl",
        "//pkg/ccl/utilccl",
        "//pkg/kv/kvserver/rditer",
        "//pkg/roachpb",
        "//pkg/settings/cluster",
        "//pkg/storage",
        "//pkg/storage/enginepb",
        "//pkg/storage/fs",
        "//pkg/util/log",
        "//pkg/util/protoutil",
        "//pkg/util/syncutil",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_errors//oserror",
        "@com_github_cockroachdb_pebble//:pebble",
        "@com_github_cockroachdb_pebble//objstorage/remote",
        "@com_github_cockroachdb_pebble//rangekey",
        "@com_github_cockroachdb_pebble//vfs",
        "@com_github_cockroachdb_pebble//vfs/atomicfs",
        "@com_github_gogo_protobuf//proto",
        "@com_github_lestrrat_go_jwx//jwa",
        "@com_github_lestrrat_go_jwx//jwk",
    ],
)

go_test(
    name = "engineccl_test",
    size = "small",
    srcs = [
        "bench_test.go",
        "ctr_stream_test.go",
        "encrypted_fs_test.go",
        "main_test.go",
        "pebble_key_manager_test.go",
    ],
    data = glob(["testdata/**"]),
    embed = [":engineccl"],
    deps = [
        "//pkg/base",
        "//pkg/ccl/baseccl",
        "//pkg/ccl/securityccl/fipsccl",
        "//pkg/ccl/storageccl/engineccl/enginepbccl",
        "//pkg/clusterversion",
        "//pkg/keys",
        "//pkg/roachpb",
        "//pkg/settings/cluster",
        "//pkg/storage",
        "//pkg/storage/enginepb",
        "//pkg/storage/fs",
        "//pkg/testutils",
        "//pkg/testutils/datapathutils",
        "//pkg/testutils/storageutils",
        "//pkg/testutils/testfixtures",
        "//pkg/util/encoding",
        "//pkg/util/hlc",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/protoutil",
        "//pkg/util/randutil",
        "//pkg/util/timeutil",
        "@com_github_cockroachdb_datadriven//:datadriven",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_errors//oserror",
        "@com_github_cockroachdb_pebble//vfs",
        "@com_github_cockroachdb_pebble//vfs/atomicfs",
        "@com_github_cockroachdb_pebble//vfs/errorfs",
        "@com_github_gogo_protobuf//proto",
        "@com_github_kr_pretty//:pretty",
        "@com_github_stretchr_testify//require",
    ],
)
